<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="AuthorActivityGraph.ascx.cs" Inherits="SubversionReports.Web.Controls.AuthorActivityGraph" %>

<h2>Browsing subversion repository at: <asp:Literal runat="server" ID="RepositoryTitle" /></h2>
<p><asp:Literal runat="server" ID="RepositoryDescription" /></p>

<p>Most active authors between <%= StartDate.ToString("dddd, MMMM dd, yy, hh:mm tt")%> and <%= EndDate.ToString("dddd, MMMM dd, yy, hh:mm tt")%> </p>

<div style="float: left; width: 280px;">
    <asp:GridView runat="server" BorderWidth="0" BorderColor="White" BorderStyle="None" ID="ActiveAuthorsTodayGridView" AutoGenerateColumns="false">
        <Columns>
            <asp:TemplateField HeaderText="Author" ItemStyle-HorizontalAlign="Center">
                <ItemTemplate>
                    <asp:Hyperlink ID="Hyperlink1" runat="server"  NavigateUrl='<%# string.Format("~/RepositoryBrowser.aspx?Filters=Author|{0}|Include", DataBinder.Eval(Container.DataItem, "Key")) %>' ImageUrl='<%# GetAuthorIconUrl((string)DataBinder.Eval(Container.DataItem, "Key"))  %>' Width="32px" Height="32px" /><br />
                    <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl='<%# string.Format("~/RepositoryBrowser.aspx?Filters=Author|{0}|Include", DataBinder.Eval(Container.DataItem, "Key")) %>' Text='<%# DataBinder.Eval(Container.DataItem, "Key") %>' />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <HeaderTemplate>Change Count</HeaderTemplate>
                <ItemTemplate>
                    <span style='padding: 0em <%# GetPadding((int)DataBinder.Eval(Container.DataItem, "Value"), Top) %>em;' class="bargraph"><%# DataBinder.Eval(Container.DataItem, "Value") %></span><br />
                    <em style="color: #aaa;"><%# string.Format("{0} change{1} in {2} commit{3}", AuthorChanges[(string)DataBinder.Eval(Container.DataItem, "Key")], AuthorChanges[(string)DataBinder.Eval(Container.DataItem, "Key")] > 1 ? "s" : string.Empty, AuthorCommits[(string)DataBinder.Eval(Container.DataItem, "Key")], AuthorCommits[(string)DataBinder.Eval(Container.DataItem, "Key")] > 1 ? "s" : string.Empty)%></em>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
</div>
<div style="margin-left: 300px;">
    <asp:BulletedList runat="server" DisplayMode="HyperLink" ID="DatePresets" />
</div>
